package com.tungse.minio.dto;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import java.util.BitSet;

@Data
@RedisHash(value = "FileUploadInfo", timeToLive = 86400) // 24小时过期
public class FileUploadInfo {
    @Id
    private String fileMd5;
    private String fileName;
    private long chunkSize;
    private long totalSize;
    private int totalChunks;
//    private BitSet uploadedChunks;
    private String filePath;
    private boolean scheme;
    
//    public boolean isUploadComplete() {
//        return uploadedChunks.cardinality() == totalChunks;
//    }
}